package la.bbs558.aop.delay;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * @Classname Delay
 * @Description TODO
 * @Date 2023/11/11 17:02
 * @Created by weihanmin
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Delay {
    //队列id
    DelayQueueEnum queueId();
    //延时时间
    long timeout();
    //延时单位
    TimeUnit timeunit();
    //最大重试次数
    int maxRetry() default 0;
    //延时执行函数
    Class<? extends DelayHandler> delayHandler() default DefaultDelayHandler.class;

}
